package com.cloudcc.mobile.view.activity;

import android.os.Bundle;
import android.view.inputmethod.InputMethodManager;

import com.cloudcc.cloudframe.bus.EventEngine;
import com.cloudcc.cloudframe.bus.IEventLife;
import com.cloudcc.cloudframe.bus.MenuToggleEventR;
import com.cloudcc.mobile.view.base.BaseFragmentActivity;
import com.cloudcc.mobile.view.fragment.BeauListFragmentType;

public class BeauListActivity extends BaseFragmentActivity implements IEventLife{
	public static BeauListActivity instance = null ;
	@Override
	public void init(Bundle savedInstanceState) {
		super.init(savedInstanceState);
		instance = this;
		register();
//		BeauListFragment listFragment = new BeauListFragment();
		BeauListFragmentType listFragment = new BeauListFragmentType();
		listFragment.setArguments(getIntent().getExtras());
		getSupportFragmentManager().beginTransaction()
				.add(getContainerId(), listFragment).commit();

	}

	public void close(){

		InputMethodManager imm = (InputMethodManager)getSystemService(mContext.INPUT_METHOD_SERVICE);
		boolean is = imm .isActive();
		imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(),0);
		//		imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);

	}
	public void onEventMainThread(MenuToggleEventR event) {
		if (menu_R == null) {
			return;
		}
		if (event.isToggle) {
			if (event.open) {
				menu_R.toggle();
                initRequestDataTz();
			}
		} else {

		}
	}
	@Override
	public void register() {
		EventEngine.register(this);
	}

	@Override
	public void unRegister() {
		EventEngine.uregister(this);
	}
}
